﻿using Joy.Erp.BasicArchives.ItemMasters;
using Joy.Erp.BasicArchives.SerialNumbers;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;

namespace Joy.Erp.BasicArchives.EntityFrameworkCore;

[ConnectionStringName(BasicArchivesDbProperties.ConnectionStringName)]
public class BasicArchivesDbContext : AbpDbContext<BasicArchivesDbContext>, IBasicArchivesDbContext
{
    /* Add DbSet for each Aggregate Root here. Example:
     * public DbSet<Question> Questions { get; set; }
     */

    //public DbSet<ItemCategory> ItemCategorys { get; set; }
    public DbSet<SerialNumber> SerialNumbers { get; set; }

    public BasicArchivesDbContext(DbContextOptions<BasicArchivesDbContext> options)
        : base(options)
    {

    }

    protected override void OnModelCreating(ModelBuilder builder)
    {
        base.OnModelCreating(builder);

        builder.ConfigureBasicArchives();
    }
}
